package com.chance.cc.crawler.prod.command.trigger.domain.commerce.jd.supplement;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.commerce.jd.JDH5CommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.jd.supplement.JDH5CommentSupplementCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.commerce.jd.supplement.JDH5DetailSupplementCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;
import org.apache.commons.lang3.StringUtils;

public class JDCommentSupplementCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
//        publishJDCommentSupplementScheduleTriggerInfo1();
        publishJDCommentSupplementScheduleTriggerInfo2();
//        publishJDCommentSupplementScheduleTriggerInfo3();
//        publishJDDetailSupplementScheduleTriggerInfo2();
    }

    public static void publishJDCommentSupplementScheduleTriggerInfo1(){
        CrawlerJob crawlerJob = JDH5CommentSupplementCrawlerScheduleJob.jdCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),1),
                JDH5CommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "京东评论单次补采");
    }

    public static void publishJDCommentSupplementScheduleTriggerInfo2(){
        CrawlerJob crawlerJob = JDH5CommentSupplementCrawlerScheduleJob.jdCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),2),
                JDH5CommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "京东评论单次补采");
    }

    public static void publishJDCommentSupplementScheduleTriggerInfo3(){
        CrawlerJob crawlerJob = JDH5CommentSupplementCrawlerScheduleJob.jdCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),3),
                JDH5CommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "京东评论单次补采");
    }

    public static void publishJDDetailSupplementScheduleTriggerInfo2(){
        CrawlerJob crawlerJob = JDH5DetailSupplementCrawlerScheduleJob.jdCrawlerJob();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                StringUtils.joinWith("-",crawlerJob.generateCrawlerTriggerKey(),2),
                JDH5CommentCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "京东商品明细单次补采");
    }
}
